<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String urlPath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ "/";
%>

<%@ include file="../../commons/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="application-name" content="移动版">
    <title>首页</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/common.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/index.css" />
</head>
<body>
	<form id="form" name="form" method="get"  action="<%=path %>/gameList/introduce" >
  		<input type="hidden" name="matchId" id="matchId" ></input>
  		<input type="hidden" name="shopId" id="shopId" value="${shopId}" ></input>
  		<input type="hidden" name="songId" id="songId" value="${songId}" ></input>
  		<input type="hidden" name="songName" id="songName" value="${songName}" ></input>
  		<input type="hidden" name="singerId" id="singerId" value="${singerId}" ></input>
  		<input type="hidden" name="singerName" id="singerName" value="${singerName}" ></input>
  		<input type="hidden" name="mp3Id" id="mp3Id" value="${mp3Id}" ></input>
  		<input type="hidden" name="url" id="url" value="${url}" ></input>
  		<input type="hidden" name="sign" id="sign" value="${sign}" ></input>
	</form>
    <header>
        <div class="head">
            <span>唱&nbsp;吧&nbsp;麦&nbsp;颂&nbsp;ktv&nbsp;比&nbsp;赛</span>
            <img src="../img/logo.png" alt="" >
        </div>
    </header>
    <div  id="container" class="container">
    	<c:forEach var="s" items="${data}" varStatus="status" >
    		<section>
<%--             	<a href="<%=path %>/gameList/introduce?matchId=${s.id}&shopId=${shopId}&songId=${songId}&songName=${songName}&singerId=${singerId}&singerName=${singerName}&mp3Id=${mp3Id}&url=${url}&sign=${sign}"> --%>
            	<a onclick="submit(${s.id})" >
					<div class="text-center">
                    	<span>
	                    	<c:if test="${status.index<hotsize}">
								<b>
	                    			hot
	                    		</b>
							</c:if>
							<c:if test="${status.index==hotsize&&1==newstatus1}">
								<b>
	                    			new
	                    		</b>
							</c:if>
	                    	<c:if test="${status.index==(hotsize+1)&&1==newstatus2}">
								<b>
	                    			new
	                    		</b>
							</c:if>
							${s.name}
						</span>
                	</div>
                	<div class="section">
                		<c:if test="${null==s.bannerPath}">
                			<img src="${pageContext.request.contextPath}/img/banner.png" alt="">
						</c:if>
						<c:if test="${null!=s.bannerPath}">
                			<img src="${pageContext.request.contextPath}${s.bannerPath}" alt="">
						</c:if>
                	</div>
                	
            	</a>
        	</section>
    	</c:forEach>
    </div>
    <script type="text/javascript" >
    	function submit(matchId){
    		$('#matchId').val(matchId);
    		//alert($("#url").val())
    		$("#form").submit();
    	}
    </script>
</body>
</html>